#pragma once
#include <vector>
using namespace std;
class JBoundary;
class JPoint;

class JPiece
{
public:
	JPiece();
	~JPiece();

private:
	vector<JBoundary*>	m_pBoundaries;
	vector<JPoint*>		m_pPoints;
public:
	void	AddBoundary(JBoundary* _pBoundary);

	void	GetBoundrayBox(CRect& _rc);

	void	GenerateBoundaryPath(vector<CPoint>& _pos);
	CPoint  GetCenterPos();

	void	ResortBoundaries();

	int		GetPointCount();
	JPoint*	GetPoint(int _idx);

	int		GetCtrlPointPos(vector<CPoint>& _pos);

	int		GetPointIdx(JPoint* _pPoint);

	int		GetBoundaryCount();
	JBoundary* GetBoundary(int _idx);

	bool	IsShareBoundary(JBoundary* _pBoundary);
};

